home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / include / enlightenment / e_container.h < prev    next >
C/C++ Source or Header  |  2006-01-09  |  5KB  |  145 lines

  1. /*
  2.  * vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
  3.  */
  4. #ifdef E_TYPEDEFS
  5.  
  6. typedef enum _E_Container_Shape_Change
  7. {
  8.    E_CONTAINER_SHAPE_ADD,
  9.    E_CONTAINER_SHAPE_DEL,
  10.    E_CONTAINER_SHAPE_SHOW,
  11.    E_CONTAINER_SHAPE_HIDE,
  12.    E_CONTAINER_SHAPE_MOVE,
  13.    E_CONTAINER_SHAPE_RESIZE,
  14.    E_CONTAINER_SHAPE_RECTS
  15. } E_Container_Shape_Change;
  16.  
  17. typedef struct _E_Container                E_Container;
  18. typedef struct _E_Border_List              E_Border_List;
  19. typedef struct _E_Container_Shape          E_Container_Shape;
  20. typedef struct _E_Container_Shape_Callback E_Container_Shape_Callback;
  21. typedef struct _E_Event_Container_Resize   E_Event_Container_Resize;
  22.  
  23. #else
  24. #ifndef E_CONTAINER_H
  25. #define E_CONTAINER_H
  26.  
  27. #define E_CONTAINER_TYPE 0xE0b01003
  28. #define E_CONTAINER_SHAPE_TYPE 0xE0b01004
  29.  
  30. struct _E_Container
  31. {
  32.    E_Object             e_obj_inherit;
  33.    
  34.    Ecore_X_Window       win;
  35.    int                  x, y, w, h;
  36.    char                 visible : 1;
  37.    E_Manager           *manager;
  38.    E_Gadman            *gadman;
  39.    
  40.    unsigned int         num;
  41.    char                *name;
  42.    
  43.    Ecore_Evas          *bg_ecore_evas;
  44.    Evas                *bg_evas;
  45.    Evas_Object         *bg_blank_object;
  46.    Ecore_X_Window       bg_win;
  47.    Ecore_X_Window       event_win;
  48.    
  49.    Evas_List           *shapes;
  50.    Evas_List           *shape_change_cb;
  51.    Evas_List           *zones;
  52.  
  53.    struct {
  54.       Ecore_X_Window win;
  55.       Evas_List *clients;
  56.    } layers[7];
  57. };
  58.  
  59. struct _E_Border_List
  60. {
  61.    E_Container *container;
  62.    int layer;
  63.    Evas_List *clients;
  64. };
  65.  
  66. struct _E_Container_Shape
  67. {
  68.    E_Object       e_obj_inherit;
  69.    
  70.    E_Container   *con;
  71.    int            x, y, w, h;
  72.    unsigned char  visible : 1;
  73.    struct {
  74.       int x, y, w, h;
  75.    } solid_rect;
  76.    Evas_List     *shape;
  77. };
  78.  
  79. struct _E_Container_Shape_Callback
  80. {
  81.    void (*func) (void *data, E_Container_Shape *es, E_Container_Shape_Change ch);
  82.    void *data;
  83. };
  84.  
  85. struct _E_Event_Container_Resize
  86. {
  87.    E_Container *container;
  88. };
  89.  
  90. EAPI int          e_container_init(void);
  91. EAPI int          e_container_shutdown(void);
  92.  
  93. EAPI E_Container *e_container_new(E_Manager *man);
  94. EAPI void         e_container_show(E_Container *con);
  95. EAPI void         e_container_hide(E_Container *con);
  96. EAPI E_Container *e_container_current_get(E_Manager *man);
  97. EAPI E_Container *e_container_number_get(E_Manager *man, int num);
  98. EAPI void         e_container_move(E_Container *con, int x, int y);
  99. EAPI void         e_container_resize(E_Container *con, int w, int h);
  100. EAPI void         e_container_move_resize(E_Container *con, int x, int y, int w, int h);
  101. EAPI void         e_container_raise(E_Container *con);
  102. EAPI void         e_container_lower(E_Container *con);
  103.  
  104. EAPI E_Border_List *e_container_border_list_first(E_Container *con);
  105. EAPI E_Border_List *e_container_border_list_last(E_Container *con);
  106. EAPI E_Border      *e_container_border_list_next(E_Border_List *list);
  107. EAPI E_Border      *e_container_border_list_prev(E_Border_List *list);
  108. EAPI void           e_container_border_list_free(E_Border_List *list);
  109.  
  110. EAPI E_Zone      *e_container_zone_at_point_get(E_Container *con, int x, int y);
  111. EAPI E_Zone      *e_container_zone_number_get(E_Container *con, int num);
  112.  
  113. EAPI E_Container_Shape *e_container_shape_add(E_Container *con);
  114. EAPI void               e_container_shape_show(E_Container_Shape *es);
  115. EAPI void               e_container_shape_hide(E_Container_Shape *es);
  116. EAPI void               e_container_shape_move(E_Container_Shape *es, int x, int y);
  117. EAPI void               e_container_shape_resize(E_Container_Shape *es, int w, int h);
  118. EAPI Evas_List         *e_container_shape_list_get(E_Container *con);
  119. EAPI void               e_container_shape_geometry_get(E_Container_Shape *es, int *x, int *y, int *w, int *h);
  120. EAPI E_Container       *e_container_shape_container_get(E_Container_Shape *es);
  121. EAPI void               e_container_shape_change_callback_add(E_Container *con, void (*func) (void *data, E_Container_Shape *es, E_Container_Shape_Change ch), void *data);
  122. EAPI void               e_container_shape_change_callback_del(E_Container *con, void (*func) (void *data, E_Container_Shape *es, E_Container_Shape_Change ch), void *data);
  123. EAPI Evas_List         *e_container_shape_rects_get(E_Container_Shape *es);
  124. EAPI void               e_container_shape_rects_set(E_Container_Shape *es, Ecore_X_Rectangle *rects, int num);
  125. EAPI void               e_container_shape_solid_rect_set(E_Container_Shape *es, int x, int y, int w, int h);
  126. EAPI void               e_container_shape_solid_rect_get(E_Container_Shape *es, int *x, int *y, int *w, int *h);
  127.  
  128. EAPI int                e_container_borders_count(E_Container *con);
  129. EAPI void               e_container_border_add(E_Border *bd);
  130. EAPI void               e_container_border_remove(E_Border *bd);
  131. EAPI void               e_container_window_raise(E_Container *con, Ecore_X_Window, int layer);
  132. EAPI void               e_container_window_lower(E_Container *con, Ecore_X_Window, int layer);
  133. EAPI E_Border          *e_container_border_raise(E_Border *bd);
  134. EAPI E_Border          *e_container_border_lower(E_Border *bd);
  135. EAPI void               e_container_border_stack_above(E_Border *bd, E_Border *above);
  136. EAPI void               e_container_border_stack_below(E_Border *bd, E_Border *below);
  137.  
  138. EAPI void               e_container_all_freeze(void);
  139. EAPI void               e_container_all_thaw(void);
  140.  
  141. extern EAPI int E_EVENT_CONTAINER_RESIZE;
  142.  
  143. #endif
  144. #endif
  145.